package com.yurun.storageservice.service;

import com.yurun.storageservice.mapper.StorageMapper;
import com.yurun.storageservice.tcc.StorageActionService;
import com.yurun.storageservice.tcc.StorageActionServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author Xi Gao
 * @date 2020/9/2 17:17
 */
@Service
public class StorageService {

    @Resource
    private StorageMapper storageMapper;

    @Autowired
    private StorageActionService storageActionService;


    public boolean reduceStorageAmount(String goodCode, Integer num) {
        return storageActionService.reduceStock(null, goodCode, num);
    }
}
